﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataChangeTools.WebApi.Common
{
    public class SqlStruct<T> where T : class, new()
    {
        /// <summary>
        /// 查询或删除的主id
        /// </summary>
        public int Id;

        /// <summary>
        /// 新增
        /// </summary>
        public T? Entity;

        /// <summary>
        /// 批删id
        /// </summary>
        public dynamic[]? Ids;

        /// <summary>
        /// 多条件查询参数,true:必选参数，false:可选参数
        /// </summary>
        public Dictionary<bool, Dictionary<string, string>>? Param;

        /// <summary>
        /// 是否返回Id(仅新增)
        /// </summary>
        public bool IsReturnId;

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDelete;

        /// <summary>
        /// 是否修改
        /// </summary>
        public bool IsUpdate;

        /// <summary>
        /// 单删id
        /// </summary>
        public string DeleteId;
    }
}
